<?php session_start(); ?> 
<html>
    <head>
        <script src="javascript/foggy_ajax.js"></script>
        <link href="css/foggy.css" type="text/css" rel="stylesheet" />
    </head>
    <body onload='loadGeoIP(); checkLoginCookies();'>
        <div id="login" class="login">
            <form class="login">
                <strong>Member Login</strong>
                <table>                
                    <tr>
                        <td>
                            <p>Email</p>
                        </td> 
                        <td>
                            <input name="email" type="text" id="email" />
                        </td>
                    </tr> 
                    <tr>
                        <td>
                            <p>Password</p>
                        </td> 
                        <td>
                            <input name="password" type="password" id="password" />
                        </td>
                    </tr> 
                    <tr>
                        <td>
                            <p>Remember</p>
                        </td> 
                        <td>
                            <input name="remember" type="checkbox" id="remember" />
                        </td>
                    </tr> 
                    <tr>
                        <td>
                            <button id="loginButton" type="button" onclick="login(document.getElementById('email').value, document.getElementById('password').value, document.getElementById('remember').value);"/>Login</button>
                        </td> 
                        <td>
                        </td>
                    </tr> 
                </table>
            </form>
        </div>
        <div class="search">
            <form> 
                <table class="search">                  
                    <tr>    
                        <td>
                            
                        </td>
                        <td style="width:200px">
                            <input style="width:200px" id="term" type="text" placeholder="What ya want?" onkeydown="if (event.keyCode == 13)
                document.getElementById('submitOld').click()"/>
                        </td>
                        <td>
                            
                        </td>
                    </tr>
                    <tr>
                        <td >
                            
                        </td>
                        <td style="width:200px">
                            <input style="width:200px" id="location" type="text" placeholder="Where y'at?" onkeydown="if (event.keyCode == 13)
                document.getElementById('submitOld').click()"/>
                        </td>
                        <td >
                            
                        </td>
                    </tr>
                    <tr>
                        <td>
                                                       
                        </td>      
                        <td style="width:200px">                              
                            <table class="search-buttons">
                                <tr class="search-buttons">
                                    <td style="width:100px">
                                        <button id="submitOld" type="button" onclick="showResults(document.getElementById('term').value, document.getElementById('location').value, 'dnk');">Anything</button>                          
                                    </td>
                                    <td style="width:100px">
                                        <button id="submitNew" type="button" onclick="showResults(document.getElementById('term').value, document.getElementById('location').value, 'new');">New Fun</button>
                                    </td>
                                </tr>
                            </table> 
                        </td>
                        <td>
                            
                        </td>
                    </tr>
                    <tr>
                        <td>
                            
                        </td>
                        <td style="width:200px">
                            <p><span id="animator"></span></p>
                        </td>
                        <td>
                            
                        </td>
                    </tr>
                    <tr>
                        <td>
                            
                        </td>
                        <td style="width:200px">
                            <p><span id="info"></span></p>       
                        </td> 
                        <td >
                            
                        </td>
                    </tr>
                </table>
                <br/>
            </form>          
        </div>

        <div class="results">
            <span id="searchResults"></span>      
        </div>

    </body>
</html>